<template>
  <view class="container">
    <input type="text" placeholder="请输入药品信息" v-model="searchQuery" />
    <view class="科室列表">
      <view class="科室标题">请选择科室</view>

      <uni-section title="本地数据" type="line">
        <uni-data-select

            v-model="departments.id"
            :localdata="departments.id"
            :value="departments.depName"
            @change="onDepartmentChange"
        ></uni-data-select>
      </uni-section>

    </view>

  </view>
</template>

<script>
import {LisrDepart} from "@/api/medicine/pharmacy";

export default {
  data() {
    return {
      departments: [],

    };
  },
  created() {
    this.DeList();
  },
  methods: {
    onDepartmentChange(e) {

      LisrDepart().then(
          res => {
            this.departments = res.data;
          }
      );

    },
    DeList(){

    },
  },
  mojunted() {
    this.DeList();
  }
};
</script>

<style>
.container {
  padding: 20px;
}
.科室列表 {
  margin-top: 20px;
}
.科室标题 {
  font-size: 18px;
  margin-bottom: 10px;
}
.picker {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.信息显示 {
  margin-top: 20px;
}

</style>
